package com.nh.entity;

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;


/**
 * NgNewsInfo entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "ng_news_info")
public class NgNewsInfo extends BaseEntity {

	// Fields

	//添加管理员
	private String createAdmin;
	//添加时间
	private Timestamp createTime;
	//发布时间
	private Timestamp publishTime;
	//状态：0不发布  1 发布 2删除
	private Integer state;
	//显示排序
	private Integer oderView;
	//信息分类
	private NgNewsCategory newsCategory;
	//信息标题
	private String title;
	//副标题
	private String subtitle;
	//是否是头信息 (0：不是 1是)
	private Integer head;
	//信息头图片地址：空为取系统设置好的图片
	private String headImg;
	//信息类型   0 (html网页信息) 1 图片组  2，视频
	private Integer infotype;
	//描述
	private String description;


	@Column(name = "create_admin", nullable = false, length = 40)
	public String getCreateAdmin() {
		return this.createAdmin;
	}

	public void setCreateAdmin(String createAdmin) {
		this.createAdmin = createAdmin;
	}

	@Column(name = "create_time", nullable = false, length = 29)
	public Timestamp getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}

	@Column(name = "state", nullable = false)
	public Integer getState() {
		return this.state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	@Column(name = "oder_view")
	public Integer getOderView() {
		return this.oderView;
	}

	public void setOderView(Integer oderView) {
		this.oderView = oderView;
	}

	/**
	 * @return the newsCategory
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "newsCategoryid")
	public NgNewsCategory getNewsCategory() {
		return newsCategory;
	}

	/**
	 * @param newsCategory the newsCategory to set
	 */
	
	
	public void setNewsCategory(NgNewsCategory newsCategory) {
		this.newsCategory = newsCategory;
	}




	/**
	 * @return the publishTime
	 */
	public Timestamp getPublishTime() {
		return publishTime;
	}

	/**
	 * @param publishTime the publishTime to set
	 */
	public void setPublishTime(Timestamp publishTime) {
		this.publishTime = publishTime;
	}

	@Column(name = "title", nullable = false, length = 255)
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "subtitle", length = 255)
	public String getSubtitle() {
		return this.subtitle;
	}

	public void setSubtitle(String subtitle) {
		this.subtitle = subtitle;
	}


	/**
	 * @return the head
	 */
	public Integer getHead() {
		return head;
	}

	/**
	 * @param head the head to set
	 */
	public void setHead(Integer head) {
		this.head = head;
	}

	@Column(name = "head_img", length = 1000)
	public String getHeadImg() {
		return this.headImg;
	}

	public void setHeadImg(String headImg) {
		this.headImg = headImg;
	}

	@Column(name = "infotype", nullable = false)
	public Integer getInfotype() {
		return this.infotype;
	}

	public void setInfotype(Integer infotype) {
		this.infotype = infotype;
	}

	/**
	 * @return the description
	 */
	@Column(name = "description",columnDefinition = "TEXT ") 
	public String getDescription() {
		return description;
	}

	/**
	 * @param description the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

}